package com.example.service.impl;

import java.util.Arrays;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.example.dao.ActorDao;
import com.example.model.Actor;
import com.example.model.query.ActorExample;
import com.example.service.ActorService;


/**
 * Created on 2017/12/26 18:50
 */
@Service
public class ActorServiceImpl implements ActorService {

    @Autowired
	private ActorDao actorDao;

    @Transactional(readOnly = true)
    public Actor selectByPrimaryKey(Short id) {
        return actorDao.selectByPrimaryKey(id);
    }

	@Transactional(readOnly = true)
	public List<Actor> selectByExample(ActorExample q) {
		return actorDao.selectByExample(q);
	}

	@Transactional
	public Object insert(Actor t) {
		return actorDao.insert(t);
	}

	@Transactional
	public Object insertSelective(Actor t) {
		return actorDao.insertSelective(t);
	}

	@Transactional
	public Object updateByPrimaryKeySelective(Actor t) {
		return actorDao.updateByPrimaryKeySelective(t);
	}

	@Transactional
	public Object updateByExampleSelective(Actor t, ActorExample q) {
		return actorDao.updateByExampleSelective(t, q);
	}

	@Transactional
	public Object updateByExample(Actor t, ActorExample q) {
		return actorDao.updateByExample(t, q);
	}

    @Transactional
    public Object updateByPrimaryKey(Actor t) {
        return actorDao.updateByPrimaryKey(t);
    }

	@Transactional(readOnly = true)
	public Long countByExample(ActorExample q) {
		return actorDao.countByExample(q);
	}

    @Transactional
    public Integer deleteByPrimaryKey(Short id) {
        return actorDao.deleteByPrimaryKey(id);
    }



	@Transactional
	public Integer deleteByExample(ActorExample q) {
		return actorDao.deleteByExample(q);
	}

}
